﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.Entities.Items;
using Lidgren.Network;
using Microsoft.Xna.Framework.Graphics;

namespace Common.Entities
{
    [Serializable]
    public class Player:Entity
    {
        private int _hp;//здоровье
        [NonSerialized]
        private Texture2D _texture;//текстура игрока
        private string _nick;//ник
        private Weapon _currentWeapon;//текущее оружее
        private Armor _currentArmor;//текущая броня
        private Inventory _inventory;//инвентарь
        private int _race;//раса
        private int _kills;//кол-во убиств
        private int _deaths;//кол-во смертей
        private int _greifPoints;//штрафные очки
        private int _exp;//опыт
        private int _lvl;//уровень
        private decimal _money;//деньги
        private TimeSpan _playTime;//время в игре
        private Guid _token;//токен для входа на сервера
        private int _textureId;//номер текстур данного персонажа
        [NonSerialized]
        public NetConnection Connection;//соединение с игроком

        public int TextureId
        {
            get { return _textureId; }
            set { _textureId = value; }
        }

        public Guid Token
        {
            get { return _token; }
            set { _token = value; }
        }

        public TimeSpan PlayTime
        {
            get { return _playTime; }
            set { _playTime = value; }
        }

        public decimal Money
        {
            get { return _money; }
            set { _money = value; }
        }

        public int Lvl
        {
            get { return _lvl; }
            set { _lvl = value; }
        }

        public int Exp
        {
            get { return _exp; }
            set { _exp = value; }
        }

        public int GreifPoints
        {
            get { return _greifPoints; }
            set { _greifPoints = value; }
        }

        public int Deaths
        {
            get { return _deaths; }
            set { _deaths = value; }
        }

        public int Kills
        {
            get { return _kills; }
            set { _kills = value; }
        }

        public int Race
        {
            get { return _race; }
            set { _race = value; }
        }

        public Inventory Inventory
        {
            get { return _inventory; }
            set { _inventory = value; }
        }

        public Armor CurrentArmor
        {
            get { return _currentArmor; }
            set { _currentArmor = value; }
        }

        public int Hp
        {
            get { return _hp; }
            set { _hp = value; }
        }

        public Texture2D Texture
        {
            get { return _texture; }
            set { _texture = value; }
        }

        public string Nick
        {
            get { return _nick; }
            set { _nick = value; }
        }

        public Weapon CurrentWeapon
        {
            get { return _currentWeapon; }
            set { _currentWeapon = value; }
        }
    }
}
